﻿Public Class frmPrincipal

    Private Sub BtnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEnter.Click
        If MdiChildren.Count > 0 Then
            Exit Sub
        End If

        Dim Child As LoginFrm
        Child = New LoginFrm
        Child.MdiParent = Me
        Child.Show()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Close()
    End Sub

    Private Sub Principal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.IsMdiContainer = True
    End Sub
End Class
